#include "stdafx.h"
#include "../OzZtypes.h"

namespace oc
{

struct InitInfo
{
	int width;
	int height;
};

#ifdef PLUGIN_EXPORT
#define PLUGIN_API __declspec(dllexport)
#else
#define PLUGIN_API __declspec(dllimport)
#endif

// Todo: can I make the funtions pure vitual and still use the object-pointer ?
class PLUGIN_API Layer
{
public:
	Layer();
	~Layer();

	TransData m_TransData;	///< used to track errors \depricated ?

							/// Initializes.
							/**
							  \param prt a rectangle, that defines the size shitty shit shit fuck, make it more interfaceable to react on events like sizechange!.
							  \return todo: make it an interface-return
							*/
	void	Init(InitInfo* ii, char* renderer, char* interf);
							/// Has to be called if the Vizualisator needs to clean up
							/** \sa FinalCleanUp()
							 */
	void	OnLostDevice();
							/// Has to be called if the Vizualisator needs to restore after a cleanup
							/** \sa OnLostDevice()
							 */
	void	OnResetDevice();
							/// Used to set the size, the system is allowed to use
							/** Should NOT be done with the root-element
							 *	because of optimization.
							 * \param rt determines the size.
							 */
	void	SetSize(Coord2D_si* rt);
							/// Cleans up the system.
							/** After a call to this function, the object can be freed or has to be initialized again.
							 *  \sa Init() Reset()
							 */
	void	FinalCleanUp();	

							/// quickly restarts the system
	void	Reset();
							/// Achieves a frame.
							/**	Updates and renders the tree of elements. You actually should call this Function as often as possible but
							 *	usually only once a frame of your application/game. Rendering your scene befor or after this overlay
							 *	can have an impact on the image-quality and on performance!
							 */
	void	Run();
};

} //namespace oc